/*
   POSPrinterControl.cpp
   
   Copyright (C) 2006 LinuxOne, Inc. <Republic of korea>

   This library is free software; you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as
   published by the Free Software Foundation; either version 2.1
   of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   Lessor General Public License for more details.

   You should have received a copy of the GNU Lessor General Public
   License along with this library; if not, write to the Free Software
   Foundation, inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

   Hyunjin Kim <mgc521@linuxone.co.kr>

   LinuxOne, Inc., hereby disclaims all copylight
   written by Hyunjin Kim, 28 December 2006
*/

#include <control/POSPrinterControl.h>

namespace booyopos
{

CPOSPrinter::CPOSPrinter()
{
	deviceControlDescription = "BooyoPOS POSPrinter Device Control";
	deviceControlVersion = 0;

	pps= new services::CPOSPrinterService;

	CBaseControl::bs=dynamic_cast<services::CBaseService *>(pps);
}

CPOSPrinter::~CPOSPrinter()
{
}

/* Capabilities */
int
CPOSPrinter::GetCapCharacterSet()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapCharacterSet();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapConcurrentJrnRec()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapConcurrentJrnRec();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapConcurrentJrnSlp()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapConcurrentJrnSlp();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapConcurrentRecSlp()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapConcurrentRecSlp();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapCoverSensor()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapCoverSensor();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapJrn2Color()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapJrn2Color();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapJrnBold()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapJrnBold();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapJrnDhigh()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapJrnDhigh();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapJrnDwide()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapJrnDwide();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapJrnDwideDhigh()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapJrnDwideDhigh();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapJrnEmptySensor()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapJrnEmptySensor();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapJrnItalic()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapJrnItalic();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapJrnNearEndSensor()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapJrnNearEndSensor();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapJrnPresent()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapJrnPresent();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapJrnUnderline()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapJrnUnderline();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapRec2Color()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapRec2Color();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapRecBarCode()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapRecBarCode();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapRecBitmap()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapRecBitmap();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapRecBold()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapRecBold();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapRecDhigh()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapRecDhigh();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapRecDwide()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapRecDwide();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool 
CPOSPrinter::GetCapRecDwideDhigh()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapRecDwideDhigh();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapRecEmptySensor()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapRecEmptySensor();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapRecItalic()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapRecItalic();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapRecLeft90()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapRecLeft90();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapRecNearEndSensor()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapRecNearEndSensor();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapRecPapercut()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapRecPapercut();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapRecPresent()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapRecPresent();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapRecRight90()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapRecRight90();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapRecRotate180()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapRecRotate180();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapRecStamp()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapRecStamp();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapRecUnderline()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapRecUnderline();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapSlp2Color()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapSlp2Color();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapSlpBarCode()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapSlpBarCode();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapSlpBitmap()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapSlpBitmap();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapSlpBold()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapSlpBold();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapSlpDhigh()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapSlpDhigh();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapSlpDwide()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapSlpDwide();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapSlpDwideDhigh()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapSlpDwideDhigh();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapSlpEmptySensor()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapSlpEmptySensor();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapSlpFullslip()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapSlpFullslip();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapSlpItalic()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapSlpItalic();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapSlpLeft90()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapSlpLeft90();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapSlpNearEndSensor()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapSlpNearEndSensor();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapSlpPresent()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapSlpPresent();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapSlpRight90()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapSlpRight90();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapSlpRotate180()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapSlpRotate180();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapSlpUnderline()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapSlpUnderline();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapTransaction()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapTransaction();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetCapPowerReporting()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapPowerReporting();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetCapJrnCartridgeSensor()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapJrnCartridgeSensor();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetCapJrnColor()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapJrnColor();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetCapRecCartridgeSensor()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapRecCartridgeSensor();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetCapRecColor()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapRecColor();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetCapRecMarkFeed()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapRecMarkFeed();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapSlpBothSidesPrint()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapSlpBothSidesPrint();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetCapSlpCartridgeSensor()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapSlpCartridgeSensor();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetCapSlpColor()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapSlpColor();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapMapCharacterSet()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapMapCharacterSet();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapStatisticsReporting()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapStatisticsReporting();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapUpdateStatistics()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapUpdateStatistics();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapCompareFirmwareVersion()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapCompareFirmwareVersion();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapConcurrentPageMode()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapConcurrentPageMode();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapRecPageMode()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapRecPageMode();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapSlpPageMode()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapSlpPageMode();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCapUpdateFirmware()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCapUpdateFirmware();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

/* Properties */
bool
CPOSPrinter::GetAsyncMode()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetAsyncMode();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::SetAsyncMode(bool asyncMode)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->SetAsyncMode(asyncMode);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetCharacterSet()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCharacterSet();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::SetCharacterSet(int characterSet)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->SetCharacterSet(characterSet);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

std::string
CPOSPrinter::GetCharacterSetList()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCharacterSetList();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetCoverOpen()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCoverOpen();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetErrorLevel()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetErrorLevel();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetErrorStation()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetErrorStation();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

std::string
CPOSPrinter::GetErrorString()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetErrorString();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetFlagWhenIdle()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetFlagWhenIdle();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::SetFlagWhenIdle(bool flagWhenIdle)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->SetFlagWhenIdle(flagWhenIdle);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

std::string
CPOSPrinter::GetFontTypefaceList()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetFontTypefaceList();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetJrnEmpty()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetJrnEmpty();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetJrnLetterQuality()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetJrnLetterQuality();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::SetJrnLetterQuality(bool jrnLetterQuality)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->SetJrnLetterQuality(jrnLetterQuality);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetJrnLineChars()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetJrnLineChars();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::SetJrnLineChars(int jrnLineChars)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->SetJrnLineChars(jrnLineChars);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

std::string
CPOSPrinter::GetJrnLineCharsList()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetJrnLineCharsList();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetJrnLineHeight()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetJrnLineHeight();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::SetJrnLineHeight(int jrnLineHeight)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->SetJrnLineHeight(jrnLineHeight);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetJrnLineSpacing()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetJrnLineSpacing();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::SetJrnLineSpacing(int jrnLineSpacing)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->SetJrnLineSpacing(jrnLineSpacing);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetJrnLineWidth()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetJrnLineWidth();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetJrnNearEnd()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetJrnNearEnd();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int 
CPOSPrinter::GetMapMode()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetMapMode();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::SetMapMode(int mapMode)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->SetMapMode(mapMode);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetOutputID()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetOutputID();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

std::string
CPOSPrinter::GetRecBarCodeRotationList()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetRecBarCodeRotationList();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetRecEmpty()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetRecEmpty();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetRecLetterQuality()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetRecLetterQuality();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::SetRecLetterQuality(bool recLetterQuality)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->SetRecLetterQuality(recLetterQuality);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetRecLineChars()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetRecLineChars();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::SetRecLineChars(int recLineChars)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->SetRecLineChars(recLineChars);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

std::string
CPOSPrinter::GetRecLineCharsList()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetRecLineCharsList();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetRecLineHeight()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetRecLineHeight();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::SetRecLineHeight(int recLineHeight)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->SetRecLineHeight(recLineHeight);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetRecLineSpacing()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetRecLineSpacing();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::SetRecLineSpacing(int recLineSpacing)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->SetRecLineSpacing(recLineSpacing);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetRecLinesToPaperCut()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetRecLinesToPaperCut();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetRecLineWidth()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetRecLineWidth();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetRecNearEnd()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetRecNearEnd();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetRecSidewaysMaxChars()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetRecSidewaysMaxChars();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetRecSidewaysMaxLines()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetRecSidewaysMaxLines();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetRotateSpecial()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetRotateSpecial();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::SetRotateSpecial(int rotateSpecial)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->SetRotateSpecial(rotateSpecial);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

std::string
CPOSPrinter::GetSlpBarCodeRotationList()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetSlpBarCodeRotationList();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetSlpEmpty()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetSlpEmpty();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetSlpLetterQuality()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetSlpLetterQuality();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::SetSlpLetterQuality(bool recLetterQuality)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->SetSlpLetterQuality(recLetterQuality);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetSlpLineChars()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetSlpLineChars();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::SetSlpLineChars(int recLineChars)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->SetSlpLineChars(recLineChars);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

std::string
CPOSPrinter::GetSlpLineCharsList()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetSlpLineCharsList();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetSlpLineHeight()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetSlpLineHeight();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::SetSlpLineHeight(int recLineHeight)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->SetSlpLineHeight(recLineHeight);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetSlpLinesNearEndToEnd()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetSlpLinesNearEndToEnd();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetSlpLineSpacing()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetSlpLineSpacing();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::SetSlpLineSpacing(int slpLineSpacing)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->SetSlpLineSpacing(slpLineSpacing);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetSlpLineWidth()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetSlpLineWidth();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetSlpMaxLines()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetSlpMaxLines();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetSlpNearEnd()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetSlpNearEnd();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetSlpSidewaysMaxChars()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetSlpSidewaysMaxChars();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetSlpSidewaysMaxLines()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetSlpSidewaysMaxLines();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetPowerNotify()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetPowerNotify();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::SetPowerNotify(int powerNotify)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->SetPowerNotify(powerNotify);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetPowerState()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetPowerState();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetCartridgeNotify()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetCartridgeNotify();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::SetCartridgeNotify(int cartridgeNotify)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->SetCartridgeNotify(cartridgeNotify);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetJrnCartridgeState()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetJrnCartridgeState();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetJrnCurrentCartridge()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetJrnCurrentCartridge();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::SetJrnCurrentCartridge(int jrnCurrentCartridge)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->SetJrnCurrentCartridge(jrnCurrentCartridge);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetRecCartridgeState()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetJrnCartridgeState();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetRecCurrentCartridge()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetRecCurrentCartridge();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::SetRecCurrentCartridge(int recCurrentCartridge)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->SetRecCurrentCartridge(recCurrentCartridge);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetSlpCartridgeState()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetSlpCartridgeState();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetSlpCurrentCartridge()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetSlpCurrentCartridge();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::SetSlpCurrentCartridge(int cartridge)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->SetSlpCurrentCartridge(cartridge);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetSlpPrintSide()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetSlpPrintSide();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

bool
CPOSPrinter::GetMapCharacterSet()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetMapCharacterSet();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::SetMapCharacterSet(bool mapCharacterSet)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->SetMapCharacterSet(mapCharacterSet);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

std::string
CPOSPrinter::GetRecBitmapRotationList()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetRecBitmapRotationList();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

std::string
CPOSPrinter::GetSlpBitmapRotationList()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetSlpBitmapRotationList();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

std::string
CPOSPrinter::GetPageModeArea()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetPageModeArea();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetPageModeDescriptor()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetPageModeDescriptor();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetPageModeHorizontalPosition()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetPageModeHorizontalPosition();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::SetPageModeHorizontalPosition(int pageHorizontalPosition)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->SetPageModeHorizontalPosition(pageHorizontalPosition);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

std::string
CPOSPrinter::GetPageModePrintArea()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetPageModePrintArea();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::SetPageModePrintArea(std::string pageModePrintArea)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->SetPageModePrintArea(pageModePrintArea);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetPageModePrintDirection()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetPageModePrintDirection();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::SetPageModePrintDirection(int pageModePrintDirection)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->SetPageModePrintDirection(pageModePrintDirection);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetPageModeStation()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetPageModeStation();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::SetPageModeStation(int pageModeStation)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->SetPageModeStation(pageModeStation);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

int
CPOSPrinter::GetPageModeVerticalPosition()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		return pps->GetPageModeVerticalPosition();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::SetPageModeVerticalPosition(int pageModeVerticalPosition)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->SetPageModeVerticalPosition(pageModeVerticalPosition);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

/* Added Method */
void
CPOSPrinter::Initialize()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->Initialize();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::FontReverse(bool onoff)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->FontReverse(onoff);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::FontSelect(bool font, bool emphasize, bool doubleHeight, bool doubleWidth, bool underline)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->FontSelect(font, emphasize, doubleHeight, doubleWidth, underline);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::FontAlign(int alignment)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->FontAlign(alignment);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::NLineFeed(unsigned int repeat)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->NLineFeed(repeat);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

/* Methods */
void
CPOSPrinter::BeginInsertion(int timeout)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->BeginInsertion(timeout);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::BeginRemoval(int timeout)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->BeginRemoval(timeout);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::ClearOutput()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->ClearOutput();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::CutPaper(int percentage)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->CutPaper(percentage);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::EndInsertion()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->EndInsertion();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::EndRemoval()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->EndRemoval();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::PrintBarCode(int station, std::string data, int symbology, int height, int width, int alignment, int
		textPosition)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->PrintBarCode(station, data, symbology, height, width, alignment, textPosition);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::PrintBitmap(int station, std::string fileName, int width, int alignment)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->PrintBitmap(station, fileName, width, alignment);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::PrintImmediate(int station, std::string data)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->PrintImmediate(station, data);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::PrintNormal(int station, std::string data)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->PrintNormal(station, data);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::PrintTwoNormal(int stations, std::string data1, std::string data2)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->PrintTwoNormal(stations, data1, data2);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::RotatePrint(int station, int rotation)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->RotatePrint(station, rotation);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::SetBitmap(int bitmapNumber, int station, std::string fileName, int width, int alignment)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->SetBitmap(bitmapNumber, station, fileName, width, alignment);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::SetLogo(int location, std::string data)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->SetLogo(location, data);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::TransactionPrint(int station, int control)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->TransactionPrint(station, control);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::ValidateData(int station, std::string data)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->ValidateData(station, data);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::ChangePrintSide(int side)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->ChangePrintSide(side);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::MarkFeed(int type)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->MarkFeed(type);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::ClearPrintArea()
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->ClearPrintArea();
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::PageModePrint(int control)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->PageModePrint(control);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::PrintMemoryBitmap(int station, char* data, int type, int width, int alignment)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->PrintMemoryBitmap(station, data, type, width, alignment);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

/* Statistics */
void
CPOSPrinter::ResetStatistics(std::string statisticsBuffer)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->ResetStatistics(statisticsBuffer);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::RetrieveStatistics(std::string statisticsBuffer[])
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->RetrieveStatistics(statisticsBuffer);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::UpdateStatistics(std::string statisticsBuffer)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->UpdateStatistics(statisticsBuffer);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::CompareFirmwareVersion(std::string firmwareFileName, int* result)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->CompareFirmwareVersion(firmwareFileName, result);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

void
CPOSPrinter::UpdateFirmware(std::string firmwareFileName)
throw (CByException)
{
	try
	{
		if(!bOpen)
		{
			throw CByException(E_CLOSED, "Control not opened");
		}

		pps->UpdateFirmware(firmwareFileName);
	}
	catch(CByException bye)
	{
		throw bye;
	}
	catch(std::exception e)
	{
		throw CByException(E_FAILURE, "Unhandled exception from Device Service", e);
	}
}

} // namespace booyopos
